<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Shijue_biz extends CI_Controller {

	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/index.php/welcome
	 *	- or -
	 * 		http://example.com/index.php/welcome/index
	 *	- or -
	 * Since this controller is set as the default controller in
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/welcome/<method_name>
	 * @see https://codeigniter.com/user_guide/general/urls.html
	 */

	function __construct() {
		parent::__construct();
		//ignore_user_abort();//关掉浏览器，PHP脚本也可以继续执行.
		//set_time_limit(3000);// 通过set_time_limit(0)可以让程序无限制的执行下去
		//$interval=5;// 每隔5s运行
		date_default_timezone_set('Asia/Shanghai'); 

		
	}

	public function get_biz($limit = ''){
		$limit = $_POST['limit'];
		//$limit = 20;
		if($limit){
			$rs = "SELECT biz,clue_address FROM shijue_project_new where clue_type = 2 and status = 2 ORDER BY biz limit ".$limit;
			$res = $this->db->query($rs);
                	$data= $res->result_array();
			print_r(json_encode($data,true));		
		}else{
			echo "limit 为null";
		}
	
	


	}	
}
